#ifndef HOMECOUNTWIDGET_H
#define HOMECOUNTWIDGET_H

#include <QDialog>
#include "companyservice.h"
#include "userservice.h"

namespace Ui {
class HomeCountWidget;
}

class HomeCountWidget : public QDialog
{
    Q_OBJECT
public:
    enum CountType{
        TicketCount=0,      //发票盘点
        MoneyCount=1,       //资金盘点
    };

    Q_ENUM(CountType)

    explicit HomeCountWidget(QWidget *parent = nullptr);
    ~HomeCountWidget();

    void setWidgetType(CountType widgetType);

private slots:
    void on_pushButtonCancel_clicked();

    void on_lineEditCountValue_editingFinished();

    void on_pushButtonSubmit_clicked();

private:
    Ui::HomeCountWidget *ui;
    CountType widgetType;
    CompanyService companyService;
    UserService userService;
};

#endif // HOMECOUNTWIDGET_H
